package com.mykt.controller;

import com.mykt.baseResult.RespondsResult;
import com.mykt.service.ProductInfoService;
import com.mykt.service.RedisService;
import com.mykt.baseResult.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/product")
public class ProductInfoController extends BaseController {

    @Autowired
    private ProductInfoService productInfoService;

    @Autowired
    private RedisTemplate redisTemplate;

    @Autowired
    private RedisService redisService;

    @GetMapping(value = "/getList")
    public RespondsResult getList() {
        return  respondsTable(productInfoService.getList());
    }

}

